﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Model
{
    [Serializable]
    public partial class Bas1a25
    {
		private string _slistid;
		private string _plistid;
		private string _storagetype;
        private int? _addcode;
		private string _addname;
		private string _teluser;
		private string _tel;
		private string _fax;
		private string _listid;
		private string _muser;
		private string _status;
		
        /// <summary>
        /// 销售商主键
        /// </summary>
		public string Slistid
		{
			get { return _slistid;	 }
			set { _slistid=value;	}
		}
        /// <summary>
        /// 门店主键
        /// </summary>
		public string Plistid
		{
			get { return _plistid;	 }
			set { _plistid=value;	}
		}
        /// <summary>
        /// 仓库类型
        /// </summary>
		public string Storagetype
		{
			get { return _storagetype;	 }
			set { _storagetype=value;	}
		}
        /// <summary>
        /// 地址代码
        /// </summary>
		public int? Addcode
		{
			get { return _addcode;	 }
			set { _addcode=value;	}
		}
        /// <summary>
        /// 地址名称
        /// </summary>
		public string Addname
		{
			get { return _addname;	 }
			set { _addname=value;	}
		}
        /// <summary>
        /// 联系人
        /// </summary>
		public string Teluser
		{
			get { return _teluser;	 }
			set { _teluser=value;	}
		}
        /// <summary>
        /// 联系电话
        /// </summary>
		public string Tel
		{
			get { return _tel;	 }
			set { _tel=value;	}
		}
        /// <summary>
        /// 传真
        /// </summary>
		public string Fax
		{
			get { return _fax;	 }
			set { _fax=value;	}
		}
        /// <summary>
        /// 主键标识
        /// </summary>
		public string Listid
		{
			get { return _listid;	 }
			set { _listid=value;	}
		}
        /// <summary>
        /// 用户标识
        /// </summary>
		public string Muser
		{
			get { return _muser;	 }
			set { _muser=value;	}
		}
        /// <summary>
        /// 
        /// </summary>
		public string Status
		{
			get { return _status;	 }
			set { _status=value;	}
		}
		
		public static List<Bas1a25> GetBas1a25ListByDataTable(DataTable dt)
		{
			if(dt == null) return null;
		    List<Bas1a25> list = new List<Bas1a25>();
		   
			foreach(DataRow dr in dt.Rows)
            {
				Bas1a25 model = GetBas1a25ByDataRow(dr);
				if(null == model) continue;
				
				list.Add(model);
            }
           return list;
		}
		
		public static Bas1a25 GetBas1a25ByDataRow(DataRow dr)
		{
			Bas1a25 model = new Bas1a25(); //实例化Bas1a25
	
			DataColumnCollection dcc = dr.Table.Columns;

			if (dcc.Contains("slistid")&&!(dr["slistid"] is System.DBNull))  
				model.Slistid = ( string)dr["slistid"];
			if (dcc.Contains("plistid")&&!(dr["plistid"] is System.DBNull))  
				model.Plistid = ( string)dr["plistid"];
			if (dcc.Contains("storagetype")&&!(dr["storagetype"] is System.DBNull))  
				model.Storagetype = ( string)dr["storagetype"];
			if (dcc.Contains("addcode")&&!(dr["addcode"] is System.DBNull))  
				model.Addcode = ( int)dr["addcode"];
			if (dcc.Contains("addname")&&!(dr["addname"] is System.DBNull))  
				model.Addname = ( string)dr["addname"];
			if (dcc.Contains("teluser")&&!(dr["teluser"] is System.DBNull))  
				model.Teluser = ( string)dr["teluser"];
			if (dcc.Contains("tel")&&!(dr["tel"] is System.DBNull))  
				model.Tel = ( string)dr["tel"];
			if (dcc.Contains("fax")&&!(dr["fax"] is System.DBNull))  
				model.Fax = ( string)dr["fax"];
			if (dcc.Contains("listid")&&!(dr["listid"] is System.DBNull))  
				model.Listid = ( string)dr["listid"];
			if (dcc.Contains("muser")&&!(dr["muser"] is System.DBNull))  
				model.Muser = ( string)dr["muser"];
			if (dcc.Contains("status")&&!(dr["status"] is System.DBNull))  
				model.Status = ( string)dr["status"];
			
			return model;
		}
    }
}
